var defLineChartOption = {
	backgroundColor: 'white',
    tooltip: {
        trigger: 'axis',
        formatter:'{b}<br/>{a} : {c}m'
    },
    legend: {
        data:['水位'],
      	x:'right',
      	y:'top'
    },
    toolbox: {
        show: true
    },
    calculable: true,
    xAxis: [{
        name: '日期',
        type: 'category',
        boundaryGap: false
    }],
    yAxis: [{
        name: '水位(m)',
        type: 'value'
    }],
    series: [{
        name: '水位',
        type: 'line',
        itemStyle: {
            normal: {
                color: '#498AF3',
                borderWidth: '1px'
            }
        },
        smooth: true,
        symbol: 'none'
    }]
};

function lineExtend(data) {
    var chartOption = $.extend(true, {}, defLineChartOption, {
        xAxis: [{
            data: data.time
        }],
        yAxis:[{
        	min:data.min,
        	max:data.max
        }],
        series: [{
            data: data.value
        }]
    });
    return chartOption;
}